<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>盒子练习</title>
    <style>

        div {
            width: 500px;
            height: 100px;
            margin: 15px auto;
            padding: 5px;
            border: 5px dashed black;
        }

        .border-box {
            box-sizing: border-box;
            background: pink;
        }

        .content-box {
            box-sizing: content-box;
            background: red;
        }

        .inherit {
            box-sizing: inherit;
            background: red;
        }

        .default-box {
            background: pink;
        }
    </style>
</head>
<body>
    <div class="border-box">box-sizing: border-box;</div>
    <div class="content-box">box-sizing: content-box;</div>
    <div class="inherit">box-sizing: inherit;</div>
    <div class="default-box">default</div>
</body>
</html>